#include<stdio.h>

int main()
{
	int n,i;
	scanf("%d",&n);
	struct stu{
		char name[50];
		char gender;
		int age;
		float f;
	} ;
	struct stu student[45];
	
	for(i=0;i<n;i++)
	{	
		getchar();
		gets(student[i].name);
		scanf("%c",&student[i].gender);
		scanf("%d",&student[i].age);
		scanf("%f",&student[i].f);
		
	}
	int max=0;
	float maxx=0;
	for(i=0;i<n;i++)
	{
		 if(maxx<student[i].f)
        {
            max=i;
            maxx=student[i].f;
        }
	}
	printf("\nName\t\tSex\tAge\tScore\n");

    printf("%s\t\t%c\t%d\t%5.1f\n",student[max].name,student[max].gender,student[max].age,student[max].f);
	return 0;
}
